<%@ Control Language="C#" AutoEventWireup="true" Codebehind="WeaponListControl.ascx.cs"
    Inherits="ASP_TF2LogParser.UserControls.WeaponListControl" %>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1">
    <Columns>
        <asp:TemplateField HeaderText="Weapon" SortExpression="WeaponFullName">
            <ItemTemplate>
                <asp:Label runat="server" Text='<%# GenerateWeaponUrl( Eval("WeaponFullName").ToString(), Eval("WeaponId").ToString() ) %>'
                    ID="WeaponLabel"></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="Kills" HeaderText="Kills" ReadOnly="True" SortExpression="Kills" />
        <asp:TemplateField HeaderText="Kill %" SortExpression="KillDeathRatio">
            <ItemTemplate>
                <asp:Label runat="server" Text='<%# GetKillPercentage( Convert.ToInt32(Eval("Kills").ToString()) ) %>'
                    ID="KillPercentageLabel"></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Class" SortExpression="ClassId">
            <ItemTemplate>
                <asp:Label runat="server" Text='<%# GenerateClassUrl( Eval("ClassId").ToString() ) %>'
                    ID="ClassLabel"></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetWeaponsStatsList"
    TypeName="LogParser.DA.WeaponModel"></asp:ObjectDataSource>
